package com.cpi.cornpp.customer.exception;

import com.cpi.cornpp.common.exception.CornPPException;

	/**
	 * This class handles all Customer exceptions
	 * @author Administrador
	 *
	 */
	public class CustomerException extends CornPPException {
		
		/** Serialization UID*/
		private static final long serialVersionUID = -4304527231555264282L;
		/** Code Identifier Module */
		private static final	String MODULE_EXCEPTION_ERR		= 	"04";//$NON-NLS-1$
		/** Layer Code Level */
		private String prosLevel	=	null;
		/** Handler Code Action */
		private String prosAction	=	null;
		/** Code Message constructor */
		StringBuffer eCode;
		/** Inicialitation Period Exception with Level code and Action Code */
		public CustomerException(Exception exception, String level, String action) {
			super(exception);
			this.prosLevel = level;
			this.prosAction = action;
		}
		/** Inicialitation Period Exception with Level code and Action Code */
		public CustomerException(String message, String level, String action) {
			super(message);
			this.prosLevel = level;
			this.prosAction = action;
		}	
		/** Sets the Code Action */
		public void setProsAction(String prosAction) {
			this.prosAction = prosAction;
		}
		/** Sets the Code Level */
		public void setProsLevel(String prosLevel) {
			this.prosLevel = prosLevel;
		}
		/** Gets the Code Exception */
		public String getExceptionCode() {
			eCode = new StringBuffer(0);
			eCode.append(MODULE_EXCEPTION_ERR);
			eCode.append(this.prosAction);
			eCode.append(this.prosLevel);
			return eCode.toString();		
		}
	}



